import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/index.vue'
import Community from '@/views/community/community.vue'
import CommunityContent from '@/views/community/community_content.vue'
import CommunityResource from '@/views/community/community_resource.vue'
import Personal from '@/views/Personal/Personal.vue'
import PersonalHome from '@/views/Personal/Home.vue'
import PersonalTask from '@/views/Personal/Task.vue'
import PersonalArtical from '@/views/Personal/Artical.vue'
import PersonalSetting from '@/views/Personal/Setting.vue'
// import Test from '@/components/Tag/Tag.vue'

Vue.use(Router)

const routes = []

routes.push(
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/community',
    name: 'community',
    component: Community
  },
  {
    path: '/community_content',
    name: 'communityContent',
    component: CommunityContent
  },
  {
    path: '/community_resource',
    name: 'communityResource',
    component: CommunityResource
  },
  {
    path: '/personal',
    name: 'personal',
    component: Personal,
    children: [
      {
        path: '/personal',
        name: 'personalHome',
        component: PersonalHome,
      },
      {
        path: '/personal_task',
        name: 'personalTask',
        component: PersonalTask,
      },
      {
        path: '/personal_artical',
        name: 'personalArtical',
        component: PersonalArtical,
      },
      {
        path: '/personal_setting',
        name: 'personalSetting',
        component: PersonalSetting,
      },
    ]
  },

  // {
  //   path: '/test',
  //     name: 'test',
  //   component: Test
  // }
)

const router = new Router({
  routes
})

export default router
